package com.mengxuegu.springboot;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisOperations;

@EnableCaching  // 开启注解版的缓存
@MapperScan("com.mengxuegu.springboot.mapper")
@SpringBootApplication
public class SpringBoot13CacheApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(SpringBoot13CacheApplication.class, args);
        RedisAutoConfiguration redisAutoConfiguration = context.getBean(RedisAutoConfiguration.class);
        RedisConnectionFactory redisConnectionFactory = context.getBean(RedisConnectionFactory.class);
//        RedisOperations redisOperations = context.getBean(RedisOperations.class);
        System.out.println();
    }

}
